class ChestRenderer : public IBlockRenderer
{
public:
	ITexture *Texture;

	ChestRenderer(ITexture *texture) :
		Texture(texture)
	{
	}

	int GetTypeData(const int &data) { return 0; }

	void Render(Schematic *schematic, RendererBase *renderer, const Block &block, const Point3i &position)
	{
		renderer->Translate(8, 8, 8);
		switch (block.Data)
		{
		case 2:
			renderer->Rotate(180, 0, 1, 0);
			break;
		case 4:
			renderer->Rotate(-90, 0, 1, 0);
			break;
		case 5:
			renderer->Rotate(90, 0, 1, 0);
			break;
		}
		renderer->Translate(-8, -8, -8);

		renderer->Draw(Box(Texture, Point3i(14, 10, 14), Point3i(1, 6, 1)).Unwrap(Point2i(14, 33)));
		renderer->Draw(Box(Texture, Point3i(14, 4, 14), Point3i(1, 2, 1)).Unwrap(Point2i(14, 14)));

		renderer->Draw(Box(Texture, Point3i(2, 4, 1), Point3i(7, 5, 15)).Unwrap(Point2i(1, 1)));
	}
};